import urllib

from google.appengine.ext import blobstore
from google.appengine.ext.webapp import blobstore_handlers
from util.webapp import ShopkeepApplication, ShopkeepHandler

class ServePage(blobstore_handlers.BlobstoreDownloadHandler, ShopkeepHandler):
	def get(self, resource):
		resource = str(urllib.unquote(resource))
		blob_info = blobstore.BlobInfo.get(resource)
		self.send_blob(blob_info)

app = ShopkeepApplication([('/serve/(.*)', ServePage)])
